﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMasterPage.master" AutoEventWireup="true" CodeFile="frmProductCategoryView.aspx.cs" Inherits="Admin_frmProductCategoryView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="headerCell">View Product Category</div>

    <!--Search Control-->
    <div class="contactFormSearch">
    
        <!--Collapsable Function Div-->
        <div id="collapse">
            <a href="javascript:collapseUser.slideit();">
                <img src="images/expand.png" alt="Expand" title="Expand" style="border:none; position:relative; top:0px" />
            </a>
        </div>
        <!--Div to make width of search control narrower-->
        <div id="divSearchControl" visible="false">
            
            <!--This div is used just to set the padding-->
            <div style="padding:5px">
            
                <div class="searchLabel">&nbsp;Search Field:</div>
                <div class="searchField">
                    <asp:DropDownList ID="lstSearchField" runat="server" CssClass="lstItem">
                        <asp:ListItem Selected="True" Value="--All--">--All--</asp:ListItem>
                        <asp:ListItem Value="strFirstName">First Name</asp:ListItem>
                        <asp:ListItem Value="strSurname">Surname</asp:ListItem>
                        <asp:ListItem Value="strEmailAddress">Email Address</asp:ListItem>
                        
                    </asp:DropDownList> 
                </div>
                
                <b class="spacer"></b>

                <div class="searchLabel">&nbsp;Search Criteria:</div>
                <div class="searchField">
                    <asp:TextBox ID="txtSearchCriteria" runat="server" CssClass="textBox" onKeyUp="return SetMaxLength(this,80)"></asp:TextBox>
                </div>
                
                <b class="spacer"></b><b class="spacer"></b>
                
                <asp:ImageButton ID="btnSearch" ImageUrl="images/btnSearch.png" AlternateText="Search" runat="server" /> 

            </div>
            
        </div>
                         
    </div>
    <!--End Search Control-->

    <asp:DataGrid ID="dgrGrid" runat="server" AutoGenerateColumns="False" AllowSorting="True"
        AllowPaging="True" PageSize="15" PagerStyle-Mode="NumericPages" OnPageIndexChanged="dgrGrid_PageIndexChanged"
        OnSortCommand="dgrGrid_SortCommand" CellPadding="3" HeaderStyle-CssClass="dgrHeader"
        PagerStyle-NextPageText="Next" PagerStyle-PrevPageText="Prev" ItemStyle-CssClass="dgrItem"
        AlternatingItemStyle-CssClass="dgrAltItem" PagerStyle-CssClass="dgrPg" CssClass="dgr">
        <PagerStyle Mode="NumericPages" NextPageText="Next" PrevPageText="Prev" CssClass="dgrPg">
        </PagerStyle>
        <AlternatingItemStyle CssClass="dgrAltItem"></AlternatingItemStyle>
        <ItemStyle CssClass="dgrItem"></ItemStyle>
        <Columns>
            <asp:BoundColumn DataField="iProductCategoryID" Visible="false" />
            <asp:BoundColumn DataField="strCategoryName" HeaderText="Category Name" SortExpression="strProductTitle"
                HeaderStyle-ForeColor="white" ItemStyle-BorderColor="#D8D9DA"></asp:BoundColumn>
            <asp:BoundColumn DataField="strCategoryType" HeaderText="Category Type" SortExpression="strShortDescription"
                HeaderStyle-ForeColor="white" ItemStyle-BorderColor="#D8D9DA"></asp:BoundColumn>
            <asp:BoundColumn DataField="strCategoryDescription" SortExpression="Category Description" HeaderText="Price"
                HeaderStyle-ForeColor="white" ItemStyle-BorderColor="#D8D9DA">
                <HeaderStyle ForeColor="White"></HeaderStyle>
                <ItemStyle BorderColor="#D8D9DA"></ItemStyle>
                <HeaderStyle ForeColor="White" />
                <ItemStyle BorderColor="#D8D9DA" />
            </asp:BoundColumn>
            <asp:TemplateColumn HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                ItemStyle-BorderColor="#D8D9DA">
                <ItemTemplate>
                    <asp:HyperLink ID="lnkEditItem" runat="Server" OnDataBinding="dgrGrid_PopEditLink" />
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
                <ItemStyle BorderColor="#D8D9DA"></ItemStyle>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="Delete" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Width="50px"
                ItemStyle-BorderColor="#D8D9DA">
                <ItemTemplate>
                    <asp:HyperLink ID="lnkDeleteItem" runat="Server" OnDataBinding="dgrGrid_PopDeleteLink" />
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" Width="50px"></HeaderStyle>
                <ItemStyle BorderColor="#D8D9DA"></ItemStyle>
            </asp:TemplateColumn>
        </Columns>
        <HeaderStyle CssClass="dgrHeader"></HeaderStyle>
    </asp:DataGrid>

    <div class="buttons">
        <asp:ImageButton ID="btnAdd" ImageUrl="~/Admin/images/btnAdd.png" AlternateText="Add User"
            CssClass="btnAdd" runat="server" OnClick="btnAdd_Click" />
    </div>

    <script language="javascript" type="text/javascript">
        //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/fase), [initialstate] )
        var collapseUser = new animatedcollapse("divSearchControl", 600, true, "none")
        if (document.getElementById("divSearchControl").visible == "false") {
            document.getElementById("divSearchControl").style.position = "relative"
            document.getElementById("divSearchControl").style.top = "0px"
        }
    </script>
</asp:Content>

